{% extends 'ProjResManBundle::layout.html.twig' %}

{% block header_menu_login_href %}{% if template_content.auth.isAuth == false %}{{ template_content.header.menu.login }}{% else %}{{ template_content.header.menu.logout }}{% endif %}{% endblock %}
{% block header_menu_login_text %}{% if template_content.auth.isAuth == false %}{{ template_content.header.text.login }}{% else %}{{ template_content.header.text.logout }}{% endif %}{% endblock %}
{% block header_menu_login_user %}{% if template_content.auth.isAuth == true %}{{ template_content.auth.user }}{% endif %}{% endblock %}
{% block header_menu_login_message %}{% if template_content.auth.isAuth == true %}User:{% endif %}{% endblock %}
{% block content %}
<div id="page_content">
    <div id="submenu">
        <div id="submenu_float1">
            <div id="submenu_float2">
                <ul>
                    {% block submenu -%}
                    {% for item in template_content.content.submenu %}
                    <ul class="submenu_option">
                        <a href={{ item.href }}>
                        <li class="submenu_header">{{ item.title }}</li>
                        <li class="submenu_details">{{ item.title_desc }}</li>
                    </a>
                    </ul>
                    {% endfor %}
                    {% endblock %}
                </ul>
            </div>
        </div>
    </div>
    
    <form id="headmaster_center_form" action="{{ path('headmaster_activity_add', {"project_id": projectId}) }}" method="post" {{ form_enctype(form) }}>
        <h3>Adauga activitate</h3>
        {% for flashMessage in app.session.flashbag.get('activity-notice') %}
            <div>
                <p style="font-style: italic">
                    {{ flashMessage }}
                </p>
            </div>
        {% endfor %}
            
        {{ form_errors(form) }}
        
        {{ form_row(form.name, {'attr':{'class':'text_input'}}) }}
        {{ form_row(form.description, {'attr':{'class':'text_input'}}) }}
        {{ form_row(form.type, {'attr':{'class':'text_input'}}) }}
        {{ form_row(form.hours, {'attr':{'class':'text_input'}}) }}
        {{ form_row(form.startDate, {'attr':{'class':'date_input'}}) }}
        {{ form_row(form.endDate, {'attr':{'class':'date_input'}}) }}

        {{ form_rest(form) }}
        
        <div>
            <table>
                <tr>
                    <td>
                        <a href="{{ path('headmaster_get_activities', {'project_id': projectId}) }}" style="text-decoration: none">
                            <button type="button" class="btn btn-info">Inapoi</button>
                        </a>
                     
                    </td>
                    <td style="width: 50%;" />
                    <td>
                        <input type="submit" class="btn btn-info" value="Adauga">
                    </td>
                 </tr>
            </table>
        </div>
        
    </form>
</div>      
    
{% endblock %}